import request from '@/utils/request'
// 获取套餐列表
export const getSetMealList = (data) => request.get('/setmeal/page', { params: data })

//添加套餐
export const addSetMeal = (data) => request.post('/setmeal/save', data)

//根据id查询套餐相关信息
export const getSetMealById = (id) => request.get(`/setmeal/getSetMealById/${id}`)

//编辑套餐
export const updateSetMeal = (data) => request.put('/setmeal/update', data)

////批量停售（起售）
export const updateBatchStatus = (data) => request.put('/setmeal/updateBatchStatus',data)

//批量删除
export const deleteSetMeal = (ids) => request.delete('/setmeal/deleteBatch', {data: ids})

//单个删除
export const deleteSetMealById = (id) => request.delete(`/setmeal/delete/${id}`)

//根据分类获取到对应的套餐信息
export const getSetMealsAndRelatedDishesByCategory = (data) => request.get(`/setmeal/getSetMealsAndRelatedDishesByCategoryId`,{params:data})